//
//  TempCity.m
//  07-homework
//
//  Created by dllo on 16/7/12.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "TempCity.h"

@implementation TempCity
- (instancetype)initWithCityName:(NSString *)cityName cityNumber:(NSString *)cityNumber{
    self = [super init];
    if (self) {
        _cityName = cityName;
        _cityNumber = cityNumber;
    }
    return self;
}

- (void)setCityName:(NSString *)cityName {
    if (_cityName != cityName) {
        [_cityName release];
        _cityName = [cityName copy];
    }
}
- (void)setCityNumber:(NSString *)cityNumber {
    if (_cityNumber != cityNumber) {
        [_cityNumber release];
        _cityNumber = [cityNumber copy];
    }
}
- (id)copyWithZone:(NSZone *)zone {
    TempCity *tempCity = [[TempCity allocWithZone:zone] init];
    tempCity.cityName = _cityName;
    tempCity.cityNumber = _cityNumber;
    return tempCity;
}
- (NSString *)description {
    return [NSString stringWithFormat:@"cityName:%@ cityNumber:%@", _cityName, _cityNumber];
}
- (void)dealloc {
    [_cityName release];
    [_cityNumber release];
    [super dealloc];
}


@end
